import { request } from '@boeyo/portal';

/**
 * 业务主机列表
 * @ss.hasPermi('serverAssetBizHost:list')
 */
export const labelList = (params) => {
  return request({
    url: '/serverAssetBizHost/list',
    method: 'GET',
    params,
  });
};

/**
 * 新增业务主机
 * @ss.hasPermi('serverAssetBizHost:add')
 */
export const bizHostAdd = (data) => {
  return request({
    url: '/serverAssetBizHost/add',
    method: 'POST',
    data,
  });
};

/**
 * 分组选择下拉列表
 * @ss.hasPermi('serverAssetGroup:selectList')
 */
export const groupSelectList = (params?) => {
  return request({
    url: '/serverAssetGroup/selectList',
    method: 'GET',
    params,
  });
};

/**
 * 标签选择下拉列表
 * @ss.hasPermi('serverAssetLabel:selectList')
 */
export const labelSelectList = (params?) => {
  return request({
    url: '/serverAssetLabel/selectList',
    method: 'GET',
    params,
  });
};

/**
 * 监测项树形列表
 * null
 */
export const treeList = (data) => {
  return request({
    url: '/alarm/monitorTree',
    method: 'POST',
    data,
  });
};

/**
 * 修改业务主机
 * @ss.hasPermi('serverAssetBizHost:update')
 */
export const bizHostUpdate = (data) => {
  return request({
    url: '/serverAssetBizHost/update',
    method: 'PUT',
    data,
  });
};

/**
 * 删除业务主机
 * @ss.hasPermi('serverAssetGroup:delete')
 */
export const GroupDelete = (ids) => {
  return request({
    url: `/serverAssetBizHost/delete/${ids}`,
    method: 'DELETE',
  });
};
